import React from 'react';
import ReactDOM from 'react-dom';
import './index.less';
import { ConfigProvider, notification } from 'antd';
import zhCN from 'antd/lib/locale-provider/zh_CN';
import { HashRouter } from 'react-router-dom';
import CustomEmpty from '@/platform/components/custom-empty/CustomEmpty';
import renderRoutes from '@/platform/components/render-routes/RenderRoutes';
import routes from '@/shared/routers/root-router';

import reportWebVitals from './reportWebVitals';



notification.config({
    duration: 2
});

const customizeRenderEmpty = () => (
    <CustomEmpty />
);

ReactDOM.render(
    <ConfigProvider locale={zhCN} renderEmpty={customizeRenderEmpty}>
        <HashRouter>
            {renderRoutes(routes)}
        </HashRouter>
    </ConfigProvider>,
    document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
